package puf.m2.automaton.converter;

import puf.m2.automaton.Transition;

/**
 * This lambda checker factory returns a lambda transition checker for the type
 * of automaton passed in.
 */

public class EpsilonTransitionChecker {

    /** The epsilon string. */
    protected String EPSILON = "";

    /**
     * Returns the lambda transition checker
     */
    public static EpsilonTransitionChecker getChecker() {
        return new EpsilonTransitionChecker();
    }

    /**
     * Returns true if <CODE>transition</CODE> is a epsilon transition (i.e.
     * it's label is the epsilon string).
     *
     * @param transition
     *            the transition
     * @return true if <CODE>transition</CODE> is a epsilon transition (i.e.
     *         it's label is the epsilon string).
     */
    public boolean isEpsilonTransition(Transition transition) {
        if (transition.label().equals(EPSILON))
            return true;
        return false;
    }
}
